macos: set opengl view as opaque in opaque windows
authorChristian Hergert <chergert@redhat.com>
Mon, 7 Dec 2020 04:14:52 +0000 (20:14 -0800)
committerChristian Hergert <chergert@redhat.com>
Mon, 7 Dec 2020 04:14:52 +0000 (20:14 -0800)
We don't need the OpenGL view to be transparent if the window itself
is not transparent. This has the potential to speed up the compositing
of the GL view onto the NSWindow.

gdk/macos/GdkMacosGLView.c

index 64bd0e89c3d2dff829f97e34748e2646c71926ec..7945184c0bc03a7552f249501e0608a10087c116 100644 (file)
@@ -82,7 +82,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 
 -(BOOL)isOpaque
 {
-  return NO;
+  if ([self window])
+    return [[self window] isOpaque];
+  return YES;
 }
 
 -(BOOL)isFlipped